import request from '@/utils/request'

//获取城市树
export function getCityTree() {
  return request({
    url: '/ums/umsDict/getCityTree',
    method: 'get',
  })
}

//根据字典类型ID 查询对应字典集合
export function findDictListByTypeId(id) {
  return request({
    url: '/ums/umsDict/findListByTypeId/'+id,
    method: 'get',
  })
}

//新增字典
export function save(data) {
  return request({
    url: '/ums/umsDict/save/',
    method: 'post',
    data:data
  })
}
//删除字典
export function deleteDict(id) {
  return request({
    url: '/ums/umsDict/delete/'+id,
    method: 'get',
  })
}
//修改字典
export function update(data) {
  return request({
    url: '/ums/umsDict/update/',
    method: 'post',
    data:data
  })
}

// 根据ID查询字典

export function findById(id) {
  return request({
    url: '/ums/umsDict/findById/'+id,
    method: 'get',
  })
}
//分页查询字典
export function findByPage(data) {
  return request({
    url: '/ums/umsDict/findByPage',
    method: 'post',
    data:data
  })
}

